|
|
|
| |
|
|
|
|
If your project is very large, use modules, subroutines, and even custom DLLs to keep the "guts" of your program separate from the UI and thus easier to maintain. |
|
|
|
|
|
|
|
|
|
|
From a user interface standpoint, extra thought is required when you're writing a program that is designed to run on a PC other than your own. Visual Basic programs run on Windows 95, Windows 98, or Windows NT (not to mention Windows CE). Each of these operating systems is different, and each PC running them can be set up differently. |
|
|
|
|
|
|
|
|
|
If you want to know programmatically which operating system your user is running, check out the GetVersionEx API call or the SysInfo custom control. Instructions for using API calls are discussed in Chapter 20, "Accessing the Windows API."  |
|
|
|
|
|
|
|
|
|
|
In addition, the Windows operating system leaves a lot of room for user customization. One of the most noticeable differences may be screen resolution. If you go into the Windows Display Control Panel, you may notice that several options for screen size are available. As a developer and owner of a 21-inch monitor, I like to leave my PC at 1280×1024, which allows me to place a lot on the screen at once. However, most of your end users are likely to be operating at a lower resolution, say 640×480. The easiest solution to this problem is to design your forms for the minimum 640×480 resolution. The users at that resolution will see your application fill up the whole screen, while users at higher resolutions will have extra desktop space to open other windows. But what happens when the user adjusts the size of your form with the mouse? If you do not write code to handle this situation, users at higher resolutions could get unpleasant results, as in Figure 18.7. |
|
|
|
|
|
|
|
|
 |
|
|
|
|
|
|
|
|
Figure 18.7
If you do not respond to users resizing your form, wasted space appears. |
|
|
|
|
|